Platform-Level Interrupt Controller
RISC-Vの割り込みコントローラー
RISC-V Priviledge Manual Section 7に説明がある
7.2 Interrupt Source いわく
RISC-V harts can have both local and global interrupt sources. Only global interrupt sources are
handled by the PLIC.
global interruptしか扱わない
PLICは
interrupt gateways
割り込みソース一つにつき一個
PLIC core
優先度の処理とルーティングをする
ルーティングの宛先はhart
を内包したモジュール
PLIC core
interrupt pending bits (IP)
interrupt enable bits (IE)
PLIC coreは割り込み通知を一つ以上のターゲットに転送する
この時、転送先は
targets have any pending interrupts enabled.
software 割り込み、timer interruptなどのlocal interruptはPLICは扱わない。
これらは、latencyが低いことが求められ、割り込みの調停(arbitration)なしで動く
global interruptこそがPLICの処理する範囲
外部割り込みはいくつかのformsがある、例として、level-triggerd, edge-triggerd, message-signalled.
これらを、PLICがcommon interrupt requestへ変換して、目標へ渡す.
PLICが生成するinterrupt notificationは mip/sip/uipの内部のbitであるmeip/seip/ueipで見られる
各modeに設定できるか、delegatingのサポートがないプロセッサでは、高いpriviledge modesで割り込みをうける
Interrupt gateways
こちうか、common interrupt request formatへ変換して, PLIC coreへ渡す
PLIC coreは割り込みを保留できて、sources' IP bitで設定できる
receiving notificationの後のみ、このgatewayは割り込みを転送できる
interrupt completion messageが来ないとつぎの 割り込みを転送しない
PLIC coreへ転送した割り込みは、とりもどせない